package edu.sit.bookstore.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import edu.sit.bookstore.domain.User;
import edu.sit.bookstore.service.UserService;

@RestController
public class UserController {
	//注入service服务对象
	@Autowired
	private UserService userService;
	//定义一个方法，得到全部user
	@RequestMapping("user")
	public List<User> findAll(){
		List<User> list =userService.findAll();
		return list;
	}
	

}
